package com.hskj.springbootmybatis.controller;

import com.hskj.springbootmybatis.bean.User;
import com.hskj.springbootmybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;


    @RequestMapping("/findAllUser")
    public List<User> findAllUser() {
        List<User> userList = userService.findAllUser();
        return userList;
    }
}

